package com.ty.controller;

import com.ty.bean.SaleOrder;
import com.ty.common.bean.ResultBean;
import com.ty.common.controller.BaseController;
import com.ty.service.SaleOrderService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Api(tags = "销售订单")
@RestController
@RequestMapping("/api")
public class SaleOrderController extends BaseController {

    @Autowired
    SaleOrderService saleOrderService;


    @ApiOperation("保存")
    @PostMapping("/order")
    public ResultBean save(@RequestBody SaleOrder saleOrder) {
        return saveResult(saleOrderService.save(saleOrder));
    }
}
